import { createDraftSafeSelector } from "@reduxjs/toolkit";

export const getLocList = createDraftSafeSelector(
  (state) => state.warehouseQuery.itemDetails,
  (itemDetails) => {
    let result = [];
    if (itemDetails && itemDetails.details.length > 0) {
      itemDetails.details.forEach((i) => {
        result.push(i.locationName);
        result.push(i.qty);
      });
    }
    return result;
  }
);